package cn.ryh.ribbonrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Rao
 * @Description
 * @create 2021-12-02 9:28
 */
@Configuration
public class MyRule {
    @Bean
    public IRule getRandomRule() {
        // 定义为随机规则
        return new RandomRule();
    }
}
